<div class="row">
	<div class="col-md-8">
		<div class="table-header">
			Locations
		</div>
	<div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
		<div class="row">
			<div class="col-xs-6">
				<div class="dataTables_length" id="dynamic-table_length">
					<label>Display 
						<select name="dynamic-table_length" aria-controls="dynamic-table" class="form-control input-sm">
							<option value="10">10</option>
							<option value="25">25</option>
							<option value="50">50</option>
							<option value="100">100</option>
						</select> records</label>
					</div>
				</div>
				<div class="col-xs-6">
					<div id="dynamic-table_filter" class="dataTables_filter">
						<label>
							Search:
							<input type="search" class="form-control input-sm" placeholder="" aria-controls="dynamic-table"></label>
						</div>
					</div>
				</div>
				<table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" role="grid" aria-describedby="dynamic-table_info">
					<thead>
						<tr role="row">
							<th class="center sorting_disabled" rowspan="1" colspan="1" aria-label="">
								<label class="pos-rel">
									<input type="checkbox" class="ace">
									<span class="lbl"></span>
								</label>
							</th>
							<th class="sorting" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending">Category Name</th>
							<th class="sorting" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending">Description</th>						
							<th class="sorting_disabled" rowspan="1" colspan="1" aria-label="">Action</th>
						</tr>
				</thead>
				<tbody>	
				<?php 
				    foreach ($location_data->result() as $key => $value) {
					?>
						<tr role="row" class="even" >
							<td class="center">
								<label class="pos-rel">
									<input type="checkbox" class="ace">
									<span class="lbl"></span>
								</label>
							</td>
							<td>
								<?php echo $value->locationName; ?>
							</td>
							<td><?php echo $value->description; ?></td>
							<td>
								<div class="hidden-sm hidden-xs action-buttons">
									
									<?php echo anchor("admin_khmerhr/getDetailLocation/".$value->locationID,'<i class="ace-icon fa fa-pencil bigger-130"></i>','class="green editLocation"'); ?>
									<?php echo anchor("admin_khmerhr/deleteLocation/".$value->locationID,'<i class="ace-icon fa fa-trash-o bigger-130"></i>','class="red deleteCategory"'); ?>
								</div>
							</td>
						</tr>
					<?php 
						
					 } 

					?>			
				
				</tbody>						
			</table>
			<div class="row">
				<div class="col-xs-6">
					<div class="dataTables_info" id="dynamic-table_info" role="status" aria-live="polite">
						Total : <?php echo $totalLocation; ?> Locations
					</div>
				</div>
				<div class="col-xs-6">
					<div class="dataTables_paginate paging_simple_numbers" id="dynamic-table_paginate">
						<!-- <ul class="pagination">
							<li class="paginate_button previous disabled" aria-controls="dynamic-table" tabindex="0" id="dynamic-table_previous">
								<a href="#">Previous</a>
							</li>
							<li class="paginate_button active" aria-controls="dynamic-table" tabindex="0">
								<a href="#">1</a>
							</li>
							<li class="paginate_button " aria-controls="dynamic-table" tabindex="0">
								<a href="#">2</a>
							</li>
							<li class="paginate_button " aria-controls="dynamic-table" tabindex="0">
								<a href="">3</a>
							</li>
							<li class="paginate_button next" aria-controls="dynamic-table" tabindex="0" id="dynamic-table_next">
								<a href="#">Next</a>
							</li>
						</ul> -->
						<?php echo $links; ?>
					</div>
				</div>
			</div>
		</div>
			
	</div>
	<div class="col-md-4">
		<div class="page-header">
			<h1 id="title_location"> Add Location</h1>
		</div>
		<div class="col-md-12">
		<?php echo form_open("admin_khmerhr/addLocation",'class="form-horizontal" id="formLocation"');?>
		 	<?php
		 		if($this->session->flashdata("message_success")){
		 			echo '<div class="form-group no_margin_button">'.$this->session->flashdata("message_success").'</div>';

		 		}

		 	 ?>
			<div class="form-group no_margin_button">
			   <label  class="control-label">Location Name</label>
			    
			    <?php echo form_input('name','','class="form-control  input-sm nameLocation" required placeholder="Location Name"'); ?>
			  	
			</div>
			   
			<div class="form-group ">
			  	<label class="control-label ">Description</label>
			    <?php echo form_textarea('description','','class="form-control col-xs-5 col-sm-5 decriptionLocation" placeholder="Description"'); ?>
				
			</div>
			<input name="idLocation" type="hidden"/>
			<div class="form-group ">
			 <?php echo form_submit('submit','Save','class="btn btn-sm btn-info save_location" placeholder="Contact Person"'); ?>
			</div> 

		<?php echo form_close(); ?>			
					
	</div>
</div>
</div>

